package com.ruoyi.interview.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import com.ruoyi.interview.domain.TbInterview;
import com.ruoyi.interview.mapper.TbInterviewMapper;
import com.ruoyi.interview.service.ITbInterviewService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 面试Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-01-29
 */
@Service
public class TbInterviewServiceImpl implements ITbInterviewService
{
    @Autowired
    private TbInterviewMapper tbInterviewMapper;

    /**
     * 查询面试
     * 
     * @param interviewId 面试主键
     * @return 面试
     */
    @Override
    public TbInterview selectTbInterviewByInterviewId(Long interviewId)
    {
        return tbInterviewMapper.selectTbInterviewByInterviewId(interviewId);
    }

    /**
     * 查询面试列表
     * 
     * @param tbInterview 面试
     * @return 面试
     */
    @Override
    public List<TbInterview> selectTbInterviewList(TbInterview tbInterview)
    {
        return tbInterviewMapper.selectTbInterviewList(tbInterview);
    }

    /**
     * 新增面试
     * 
     * @param tbInterview 面试
     * @return 结果
     */
    @Override
    public int insertTbInterview(TbInterview tbInterview)
    {
        tbInterview.setCreateTime(DateUtils.getNowDate());
        return tbInterviewMapper.insertTbInterview(tbInterview);
    }

    /**
     * 修改面试
     * 
     * @param tbInterview 面试
     * @return 结果
     */
    @Override
    public int updateTbInterview(TbInterview tbInterview)
    {
        tbInterview.setUpdateTime(DateUtils.getNowDate());
        return tbInterviewMapper.updateTbInterview(tbInterview);
    }

    /**
     * 批量删除面试
     * 
     * @param interviewIds 需要删除的面试主键
     * @return 结果
     */
    @Override
    public int deleteTbInterviewByInterviewIds(Long[] interviewIds)
    {
        return tbInterviewMapper.deleteTbInterviewByInterviewIds(interviewIds);
    }

    /**
     * 删除面试信息
     * 
     * @param interviewId 面试主键
     * @return 结果
     */
    @Override
    public int deleteTbInterviewByInterviewId(Long interviewId)
    {
        return tbInterviewMapper.deleteTbInterviewByInterviewId(interviewId);
    }
}
